<?php
/* SVN FILE: $Id: core.php 7690 2008-10-02 04:56:53Z nate $ */
/**
 * This is core configuration file.
 *
 * Use it to configure core behavior of Cake.
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
 * Copyright 2005-2008, Cake Software Foundation, Inc.
 *								1785 E. Sahara Avenue, Suite 490-204
 *								Las Vegas, Nevada 89104
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright		Copyright 2005-2008, Cake Software Foundation, Inc.
 * @link				http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
 * @package			cake
 * @subpackage		cake.app.config
 * @since			CakePHP(tm) v 0.2.9
 * @version			$Revision: 7690 $
 * @modifiedby		$LastChangedBy: nate $
 * @lastmodified	$Date: 2008-10-02 00:56:53 -0400 (Thu, 02 Oct 2008) $
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 * CakePHP Debug Level:
 *
 * Production Mode:
 * 	0: No error messages, errors, or warnings shown. Flash messages redirect.
 *
 * Development Mode:
 * 	1: Errors and warnings shown, model caches refreshed, flash messages halted.
 * 	2: As in 1, but also with full debug messages and SQL output.
 * 	3: As in 2, but also with full controller dump.
 *
 * In production mode, flash messages redirect after a time interval.
 * In development mode, you need to click the flash message to continue.
 */
	Configure::write('debug', 0);
/**
 * Application wide charset encoding
 */
	Configure::write('App.encoding', 'UTF-8');
/**
 * To configure CakePHP *not* to use mod_rewrite and to
 * use CakePHP pretty URLs, remove these .htaccess
 * files:
 *
 * /.htaccess
 * /app/.htaccess
 * /app/webroot/.htaccess
 *
 * And uncomment the App.baseUrl below:
 */
	//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
 * Uncomment the define below to use CakePHP admin routes.
 *
 * The value of the define determines the name of the route
 * and its associated controller actions:
 *
 * 'admin' 		-> admin_index() and /admin/controller/index
 * 'superuser' -> superuser_index() and /superuser/controller/index
 */
	Configure::write('Routing.admin', 'admin');
	//Configure::write('Routing.admin', 'member');

/**
 * Turn off all caching application-wide.
 *
 */
	//Configure::write('Cache.disable', true);
/**
 * Enable cache checking.
 *
 * If set to true, for view caching you must still use the controller
 * var $cacheAction inside your controllers to define caching settings.
 * You can either set it controller-wide by setting var $cacheAction = true,
 * or in each action using $this->cacheAction = true.
 *
 */
	Configure::write('Cache.check', true);
/**
 * Defines the default error type when using the log() function. Used for
 * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
 */
	define('LOG_ERROR', 2);
/**
 * The preferred session handling method. Valid values:
 *
 * 'php'	 		Uses settings defined in your php.ini.
 * 'cake'		Saves session files in CakePHP's /tmp directory.
 * 'database'	Uses CakePHP's database sessions.
 *
 * To define a custom session handler, save it at /app/config/<name>.php.
 * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
 *
 * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
 *
 */
	Configure::write('Session.save', 'php');
/**
 * The name of the table used to store CakePHP database sessions.
 *
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 *
 * The table name set here should *not* include any table prefix defined elsewhere.
 */
	//Configure::write('Session.table', 'cake_sessions');
/**
 * The DATABASE_CONFIG::$var to use for database session handling.
 *
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 */
	//Configure::write('Session.database', 'default');
/**
 * The name of CakePHP's session cookie.
 */
	Configure::write('Session.cookie', 'CAKEPHP');
/**
 * Session time out time (in seconds).
 * Actual value depends on 'Security.level' setting.
 */
	Configure::write('Session.timeout', '24000');
/**
 * If set to false, sessions are not automatically started.
 */
	Configure::write('Session.start', true);
/**
 * When set to false, HTTP_USER_AGENT will not be checked
 * in the session
 */
	Configure::write('Session.checkAgent', true);
/**
 * The level of CakePHP security. The session timeout time defined
 * in 'Session.timeout' is multiplied according to the settings here.
 * Valid values:
 *
 * 'high'	Session timeout in 'Session.timeout' x 10
 * 'medium'	Session timeout in 'Session.timeout' x 100
 * 'low'		Session timeout in 'Session.timeout' x 300
 *
 * CakePHP session IDs are also regenerated between requests if
 * 'Security.level' is set to 'high'.
 */
	Configure::write('Security.level', 'low');
/**
 * A random string used in security hashing methods.
 */
	Configure::write('Security.salt', 'DYhGx3b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
 * Compress CSS output by removing comments, whitespace, repeating tags, etc.
 * This requires a/var/cache directory to be writable by the web server for caching.
 * and /vendors/csspp/csspp.php
 *
 * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
 */
	//Configure::write('Asset.filter.css', 'css.php');
/**
 * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
 * output, and setting the config below to the name of the script.
 *
 * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
 */
	//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
/**
 * The classname and database used in CakePHP's
 * access control lists.
 */
	Configure::write('Acl.classname', 'DbAcl');
	Configure::write('Acl.database', 'default');
	
	// PROFILE CONFIGURATION
	Configure::write('Map.key', 'ABQIAAAAjOuj71YATbbbZdacuIRIphTYiPaJq7BebAG6qb3AIyD0C0hDBRRflkD6iC5z29-pcdLzxkhU4LIFvw');
	Configure::write('Map.latitude', 59.9534);
	Configure::write('Map.longitude', 10.7522);
	Configure::write('Map.zoom', 9);
	
	// PROFILE CONFIGURATION
	Configure::write('Profile.avetar', 'default_user_icon.jpg');
	Configure::write('Profile.dir', 'img/p');
	Configure::write('Profile.location', 'Norge');
	Configure::write('Profile.help_title', 'Hjelp');
	Configure::write('Profile.help_body', 'Informasjonen du legger inn her er bare tilgjennelig for andre innloggede brukere.');
	Configure::write('Profile.map_title', 'Hjelp med kart');
	Configure::write('Profile.map_body', 'Dra markøren på kartet til den posisjonen hvor du bor. Klikk "Lagre" knappen når du er ferdig.');
	Configure::write('Profile.sidebar', '<h3 class="title">Registrer deg og møt andre bakere!</h3>
	<ul>
		<li>Finn nye bakervenner!</li>
		<li>Få surdeigskultur fra andre bakere!</li>
		<li>Informasjonen du legger inn vil kunn være tilgjennelig for andre innloggede bakere!</li>
	</ul>
	<p class="small">Det er gratis å delta, og du trenger ikke å bake med surdeig.</p>');
	
	// AUTHAKE CONFIGURATION
	 // Base URL, used to insert the application URL in mails.
	Configure::write('Authake.baseUrl', 'http://www.surdeig.no');
	Configure::write('Authake.from_email', 'Surdeig <surdeig@gersh.no>');
	Configure::write('Authake.reg_subject', 'Din registrering');
	Configure::write('Authake.reg_body', 'Bekreft din registrering ved å klikke på lenken under.');
	//Configure::write('Authake.baseUrl', 'http://'. $_SERVER['HTTP_HOST']); 
	//Default login action
	Configure::write('Authake.loginAction', '/authake/user/login');
	// Session timeout in seconds, if managed by Authake (or null to disable)
	Configure::write('Authake.sessionTimeout', 0);
	// Default page when access is denied (should be allowed by ACLs...)
	Configure::write('Authake.defaultDeniedAction', '/authake/user/denied');
	// Reload all rules every x seconds
	Configure::write('Authake.rulesCacheTimeout', 3000);
	Configure::write('Authake.defaultGroup', 3);
	Configure::write('Authake.adminGroup', 2);
	
	Configure::write('Authake.loginRedirect', '/profiles/home');
	Configure::write('Authake.logoutRedirect', '/');
	Configure::write('Authake.registrationRedirect', '/');
	
	
	
	// Newsletter config
	Configure::write('Newsletter.unsubscribe_tittel', 'Hade bra %name%, og takk for all fisken!');
	Configure::write('Newsletter.unsubscribe_subject', 'Bekreftelse på avmelding av nyhetsbrev');
	Configure::write('Newsletter.unsubscribe_message', 'Dette er en bekreftelse på at du er avmeldt vårt nyhetsbrev. <br />
	Hvis du skulle angre %link_subscribe%kan du melde deg på igjen her!%link_subscribe%');
	Configure::write('Newsletter.unsubscribe_message_text', "Dette er en bekreftelse på at du er avmeldt vårt nyhetsbrev. Hvis du skulle angre kan du melde deg på igjen her: \n\n%link_subscribe%");
	Configure::write('Newsletter.mail_opt_out_message', 'Din e-post har blitt fjernet fra listen');
	Configure::write('Newsletter.unsubscribe_not_found_site_message', 'Din e-post ble ikke funnet i listen');
	
	
	Configure::write('Newsletter.subscribe_tittel', 'Velkommen i gjengen %name%');
	Configure::write('Newsletter.subscribe_subject', 'Bekreft påmelding til vårt nyhetsbrev');
	Configure::write('Newsletter.subscribe_message', '<strong>Takk for at du meldte deg på vårt nyhetsbrev.</strong> For å forsikre oss om at det virkelig var deg selv som meldte deg på vårt nyhetsbrev må du bekrefte din påmelding.<br />
	Trykk på %link_confirm%denne linken for å bekrefte din påmelding!%link_confirm%');
	Configure::write('Newsletter.subscribe_message_text', "Takk for at du meldte deg på vårt nyhetsbrev. \nFor å forsikre oss om at det virkelig var deg selv som meldte deg på vårt nyhetsbrev må du bekrefte din påmelding, ved å klikke på linken under: \n\n%link_confirm%");
	
	Configure::write('Newsletter.from', 'Surdeig.no'); #Required
	Configure::write('Newsletter.from_email', 'surdeig@gersh.no'); #Required
	

	Configure::write('Newsletter.sendX', 30); #Number of emails to sent at each admin_send call.
	Configure::write('Newsletter.sendInterval', 10); #the interval time before send next batch
	
	
	Configure::write('Newsletter.emptyImagePath', '');
	Configure::write('Newsletter.siteGroup', 1);

	Configure::write('Newsletter.newsletter_title','Nyhetsbrev fra Surdeig.no');
	Configure::write('Newsletter.header_message','Du mottar denne e-posten fordi du har registrert deg på %link_homepage%www.surdeig.no%link_homepage%<br />Hvis denne e-posten ikke vises riktig kan du %link_view%lese den i din nettleser%link_view%. Ikke interessert lenger? %link_unsubscribe%Meld deg av her%link_unsubscribe%');
	
	Configure::write('Newsletter.header_message_text',"Du mottar denne e-posten fordi du har registrert deg på %link_homepage%\n Hvis denne e-posten ikke vises riktig kan du lese den i din nettleser her: %link_view%. \nIkke interessert lenger? Meld deg av her: %link_unsubscribe%");
	Configure::write('Newsletter.footer_text',"www.surdeig.no - bak bedre brød");
	
	
	
	include dirname(__FILE__) . '/../../settings_surdeig.php';
	include dirname(__FILE__) . '/settings.php';
	//foreach()
	$keys = key($config);
	//debug($keys);
	foreach($config as $key => $value) {
		foreach($value as $key2 => $value2) {
			$thekey = $key . "." . $key2;
			Configure::write($thekey, $value2);
			//echo $key . "." . $key2 . "." . $value2 . "<br />\n";
		}
	}
	
	//array_walk($config, 'test_print');
/**
 *
 * Cache Engine Configuration
 * Default settings provided below
 *
 * File storage engine.
 *
 * 	 Cache::config('default', array(
 *		'engine' => 'File', //[required]
 *		'duration'=> 3600, //[optional]
 *		'probability'=> 100, //[optional]
 * 		'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
 * 		'prefix' => 'cake_', //[optional]  prefix every cache file with this string
 * 		'lock' => false, //[optional]  use file locking
 * 		'serialize' => true, [optional]
 *	));
 *
 *
 * APC (http://pecl.php.net/package/APC)
 *
 * 	 Cache::config('default', array(
 *		'engine' => 'Apc', //[required]
 *		'duration'=> 3600, //[optional]
 *		'probability'=> 100, //[optional]
 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
 *	));
 *
 * Xcache (http://xcache.lighttpd.net/)
 *
 * 	 Cache::config('default', array(
 *		'engine' => 'Xcache', //[required]
 *		'duration'=> 3600, //[optional]
 *		'probability'=> 100, //[optional]
 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
 *		'user' => 'user', //user from xcache.admin.user settings
 *      'password' => 'password', //plaintext password (xcache.admin.pass)
 *	));
 *
 *
 * Memcache (http://www.danga.com/memcached/)
 *
 * 	 Cache::config('default', array(
 *		'engine' => 'Memcache', //[required]
 *		'duration'=> 3600, //[optional]
 *		'probability'=> 100, //[optional]
 * 		'prefix' => Inflector::slug(APP_DIR) . '_', //[optional]  prefix every cache file with this string
 * 		'servers' => array(
 * 			'127.0.0.1:11211' // localhost, default port 11211
 * 		), //[optional]
 * 		'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
 *	));
 *
 */
	Cache::config('default', array('engine' => 'File'));
?>
